package com.bci.pwtz.service.impl;

import java.util.List;

import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.log4j.Logger;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.dao.CompanyUserRoleMapper;
import com.bci.pwtz.mysql.model.CompanyUserRole;
import com.bci.pwtz.service.CompanyUserRoleService;
@Service
public class CompanyUserRoleServiceImpl implements CompanyUserRoleService {
	private CompanyUserRoleMapper objMapper;
	
	private static final Logger _logger=Logger.getLogger(CompanyUserRoleServiceImpl.class);
	
	public CompanyUserRoleMapper getObjMapper() {
		return objMapper;
	}



	public void setObjMapper(CompanyUserRoleMapper objMapper) {
		this.objMapper = objMapper;
	}



	@Override
	public List<CompanyUserRole> selectUserId(long companyRoleId)
			throws PwtzDatabaseException {
			List<CompanyUserRole> list=null;
			try {
				list=objMapper.selectUserId(companyRoleId);
			} catch(DataAccessException e){
	            _logger.error(ExceptionUtils.getStackTrace(e));
	            throw new PwtzDatabaseException();
			}
		return list;
	}

}
